package com.gz.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class WechatPayRefundsParams {

    @NotBlank(message = "商户订单号不能为空")
    @ApiModelProperty("商户订单号")
    private String out_trade_no;

    @NotBlank(message = "商户退款号不能为空")
    @ApiModelProperty("商户退款号")
    private String out_refund_no;

    @ApiModelProperty("退款原因")
    private String reason;

    @NotBlank(message = "回调url不能为空")
    @ApiModelProperty("回调url")
    private String notify_url;

    @NotNull(message = "金额信息不能为空")
    @ApiModelProperty("金额信息")
    private Amount amount;

    @Data
    public static class Amount {

        @NotNull(message = "退款金额不能为空")
        @ApiModelProperty("退款金额")
        private Long refund;

        @NotNull(message = "原订单金额不能为空")
        @ApiModelProperty("原订单金额")
        private Long total;

        @ApiModelProperty("退款币种，默认人民币")
        private String currency = "CNY";
    }
}